import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/film'
  },
  {
    path: '/film',
    name: 'film',
    component: () => import('../views/MyFilm.vue')
  },
  {
    path: '/cinema',
    name: 'cinema',
    component: () => import('../views/MyCinema.vue')
  },
  {
    path: '/news',
    name: 'news',
    component: () => import('../views/MyNews.vue')
  },
  {
    path: '/me',
    name: 'me',
    component: () => import('../views/MyCenter.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
